Skip `gpg-connect-agent` when cleaning up temporary GPG home directories
authorSimon McVittie <smcv@debian.org>
Fri, 23 Aug 2019 10:26:49 +0000 (11:26 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 23 Aug 2019 10:26:52 +0000 (11:26 +0100)
It appears this is sometimes done when it wasn't needed, causing
gpg-connect-agent to wait for an agent to start so that it can tell it
to stop, which results in a lot of noise on stderr when running `flatpak
update`. Debian 10 has GPG 2.2, and according to the commit message of
the commit I'm reverting here, this cleanup should be unnecessary with
GPG >= 2.2.

debian/changelog
debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch [new file with mode: 0644]
debian/patches/series

index 717e828a6969bdf946d3d4e870556757f350c667..77675037fb1325cff3f9a9486ac2ea54117c9c60 100644 (file)
@@ -2,6 +2,14 @@ ostree (2019.3-1) UNRELEASED; urgency=medium
 
   * New upstream release
     - Refresh patch series
+  * d/p/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch:
+    Skip `gpg-connect-agent` when cleaning up temporary GPG home
+    directories. It appears this is sometimes done when it wasn't
+    needed, causing gpg-connect-agent to wait for an agent to start so
+    that it can tell it to stop, which results in a lot of noise on stderr
+    when running `flatpak update`. Debian 10 has GPG 2.2, and according to
+    the commit message of the commit I'm reverting here, this cleanup
+    should be unnecessary with GPG >= 2.2.
 
  -- Simon McVittie <smcv@debian.org>  Fri, 23 Aug 2019 08:38:47 +0100
 
diff --git a/debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch b/debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch
new file mode 100644 (file)
index 0000000..7c1cc15
--- /dev/null
@@ -0,0 +1,49 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 23 Aug 2019 11:22:47 +0100
+Subject: Revert "lib: Kill GPG agent when cleaning up tmp homedirs"
+
+This reverts commit b6979e7572395f3f99ba328ed9399ed4b862f9a7,
+which causes a lot of logging noise when running `flatpak update`.
+According to the commit message of b6979e7572395f3f99ba328ed9399ed4b862f9a7
+this should be unnecessary with gnupg >= 2.2, which is in Debian >= 10.
+
+Forwarded: not-needed
+---
+ src/libostree/ostree-gpg-verifier.c | 1 -
+ src/libostree/ostree-repo.c         | 8 ++------
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c
+index 95ed36e..a279348 100644
+--- a/src/libostree/ostree-gpg-verifier.c
++++ b/src/libostree/ostree-gpg-verifier.c
+@@ -87,7 +87,6 @@ verify_result_finalized_cb (gpointer data,
+    *     finalize() method, but I didn't want this keyring hack
+    *     bleeding into multiple classes. */
+-  ot_gpgme_kill_agent (tmp_dir);
+   (void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL);
+ }
+diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
+index eb652be..2382f73 100644
+--- a/src/libostree/ostree-repo.c
++++ b/src/libostree/ostree-repo.c
+@@ -2328,15 +2328,11 @@ out:
+   if (remote != NULL)
+     ostree_remote_unref (remote);
+-  if (source_tmp_dir != NULL) {
+-    ot_gpgme_kill_agent (source_tmp_dir);
++  if (source_tmp_dir != NULL)
+     (void) glnx_shutil_rm_rf_at (AT_FDCWD, source_tmp_dir, NULL, NULL);
+-  }
+-  if (target_tmp_dir != NULL) {
+-    ot_gpgme_kill_agent (target_tmp_dir);
++  if (target_tmp_dir != NULL)
+     (void) glnx_shutil_rm_rf_at (AT_FDCWD, target_tmp_dir, NULL, NULL);
+-  }
+   g_prefix_error (error, "GPG: ");
index b73e566a722cdb595a2da78c1c1ef5f43703efb2..21ecd1cfb2a68a46e06ae4e9152f8f33b6966e3c 100644 (file)
@@ -1 +1,2 @@
 debian/Skip-test-pull-repeated-during-CI.patch
+debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch